<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
<link href="css/div.css" rel="stylesheet" type="text/css" />
<script src="js/jquery.js" language="javascript" type="text/javascript"></script>
<script src="js/jquery-1.4.2.js" language="javascript" type="text/javascript"></script>
<script src="js/secondmenu.js" language="javascript" type="text/javascript"></script>
</head>

<body>
<div class="box1">
	<?php include("../conn/conn.php"); ?>
	<?php include("top.php"); ?>
	<embed src="swf/index1-1.swf" width="1002" height="256" quality="high" wmode="transparent"  />
		  </div>
		</div>
		<div style=" height:10px;">&nbsp;</div>
	<div style=" height:20px;">&nbsp;</div>
	<div style=" width:1003px;">
		<?php include("tree1.php"); ?>
		<div style="float:left; width:50px;">&nbsp;</div>
		<div style=" float:left; width:750px;">
			<div style=" width: 750px; background-color:#8DBAE0; height:5px;"></div>
			<div style=" width:200px; height:15px;">&nbsp;</div>
			<div style=" width:750px; height:15px;">
				<span style=" float:left; text-align:left;color:#768DC1; font-size:15px; font-weight:bolder; height:30px;">Suggestion Box</span><span style=" float:right;text-align:right" id="span1"><a href="index.php">Home</a>-><a href="suggestionbox.php">Suggestion Box</a></span>
			</div>
			<script>
                function checkemail(){
				var temp = document.getElementById("Email");
				var temp1 =  document.getElementById("Phone");
				if(temp1.value==""){
					alert("input the phone");
					return false;
				}
				var pa = 0;
				var pattern=/^0?\d{11}$/; 
				var pattern1 = /(^[0-9]{3,4}\-[0-9]{3,8}$)|(^[0-9]{3,8}$)|(^\([0-9]{3,4}\)[0-9]{3,8}$)|(^0{0,1}13[0-9]{9}$)/;
				if(temp1.value != ""){
					var patt = pattern.test(temp1.value);
					if(patt == false){
						pa = 1;
					}
				}
				if(pa == 1){
					var patt = pattern1.test(temp1.value);
					if(patt == false){
						alert("input the right phone");
						return false;
					}
				}
				//对电子邮件的验证
				var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
					if(temp.value!=""){
						if(!myreg.test(temp.value)){
							alert('input the right E_mail！');
							temp.focus();
							return false;
						}
					}else{return false;}
				}
            </script>
			<div  style=" width:750px; text-align:right; clear:both; color:#FF7200; font-size:18px; ">Focus us, Make harmony</div>
			<?php
				if(isset($_POST["submit"])){
					$Title = $_POST["Title"];
					$From = $_POST["From"];
					$Phone = $_POST["Phone"];
					$Email = $_POST["Email"];
					$Address = $_POST["Address"];
					$Content = $_POST["Content"];
					
					$sql = mysql_query("insert into yijianxiang values('','$Title','$From','$Phone','$Email','$Address','$Content','2')");
					if($sql){
						echo "<script>alert('success!');</script>";
					}
					
				}
			?>
            
			<form action="" method="post" name="form1">
			<div  style=" width:750px; text-align:left; ">
				<div style="width:50px; font-weight:bolder; float:left; height:20px; line-height:20px; text-align:right">Title:</div>
				<div style="width:20px; float:left; height:20px; line-height:20px;">&nbsp;</div>
				<div style="height:20px; float:left; line-height:20px; border-bottom:1px solid #999999"><input name="Title" id="Title" type="text" style="width:200px;" /></div>
			</div>
			<div style=" clear:both; height:20px;"></div>
			<div  style=" width:750px; text-align:left; ">
				<div style="width:50px; font-weight:bolder; float:left; height:20px; line-height:20px; text-align:right">From:</div>
				<div style="width:20px; float:left; height:20px; line-height:20px;">&nbsp;</div>
				<div style="height:20px; float:left; line-height:20px; border-bottom:1px solid #999999"><input name="From" type="text" style="width:200px;" /></div>
			</div>
			<div style=" clear:both; height:20px;"></div>
			<div  style=" width:750px; text-align:left; ">
				<div style="width:50px; font-weight:bolder; float:left; height:20px; line-height:20px; text-align:right">Phone:</div>
				<div style="width:20px; float:left; height:20px; line-height:20px;">&nbsp;</div>
				<div style="height:20px; float:left; line-height:20px; border-bottom:1px solid #999999"><input name="Phone" id="Phone" type="text" style="width:200px;" /></div>
			</div>
			<div style=" clear:both; height:20px;"></div>
			<div  style=" width:750px; text-align:left; ">
				<div style="width:50px; font-weight:bolder; float:left; height:20px; line-height:20px; text-align:right">Email:</div>
				<div style="width:20px; float:left; height:20px; line-height:20px;">&nbsp;</div>
				<div style="height:20px; float:left; line-height:20px; border-bottom:1px solid #999999"><input name="Email" id="Email" type="text" style="width:200px;" /></div>
			</div>
			<div style=" clear:both; height:20px;"></div>
			<div  style=" width:750px; text-align:left; ">
				<div style="width:50px; font-weight:bolder; float:left; height:20px; line-height:20px; text-align:right">Address:</div>
				<div style="width:20px; float:left; height:20px; line-height:20px;">&nbsp;</div>
				<div style="height:20px; float:left; line-height:20px; border-bottom:1px solid #999999"><input name="Address" type="text" style="width:200px;" /></div>
			</div>
			<div style=" clear:both; height:20px;"></div>
			<div  style=" width:750px; text-align:left; ">
				<div style="width:50px; font-weight:bolder; float:left; height:20px; line-height:20px; text-align:right">Content:</div>
				<div style="width:20px; float:left; height:20px; line-height:20px;">&nbsp;</div>
				<div style="height:20px; float:left; line-height:20px;"><textarea name="Content" rows="5" cols="30" style=" border:1px solid #CCCCCC; height:80px;"></textarea></div>
			</div>
			<div style=" clear:both; height:100px;"></div>
			<div  style=" width:750px; text-align:left; ">
				<div style="width:120px; float:left; height:20px; line-height:20px;">&nbsp;</div>
				<div style="width:50px; font-weight:bolder; float:left; height:20px; line-height:20px; text-align:right"><input onclick="return checkemail()" name="submit" type="submit" value="submit" size="20" style=" border:1px solid #CCCCCC;"></div>
				<div style="width:80px; float:left; height:20px; line-height:20px;">&nbsp;</div>
				<div style="height:20px; float:left; line-height:20px;"><input type="reset" value="reset" size="20" style=" border:1px solid #CCCCCC;"></div>
			</div>
			</form>
		</div>
	</div>
	<?php include("foot.php"); ?>
</div>
</body>
</html>
